package com.woniuxy.crm.config;

import com.woniuxy.crm.interceptor.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: linKe
 * @Date: 2021/11/21 21:00
 * @FileName: InterceptorConfig
 * @version: 1.0
 * @Description: 拦截器配置类
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new UserInterceptor()).addPathPatterns("/user/**");
    }
}
